home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / dbms_mag / 9108 / roti1.aug < prev    next >
Text File  |  1991-06-27  |  1KB  |  28 lines

  1. Listing 1:
  2.  
  3. CREATE TABLE transactions (
  4.   transaction_number  NUMBER(8)  NOT NULL,
  5.   account_id          VARCHAR(6) NOT NULL,
  6.   transaction_type    CHAR(1)    NOT NULL,
  7.   amount              NUMBER(6)  NOT NULL,
  8.   posted              CHAR(1)    NOT NULL);
  9. INSERT INTO transactions VALUES (1, '111222', 'P', 100, 'N');
  10. INSERT INTO transactions VALUES (2, '222333', 'P', 200, 'N');
  11. INSERT INTO transactions VALUES (3, '222333', 'C', 300, 'N');
  12. INSERT INTO transactions VALUES (4, '999999', 'P', 400, 'N');
  13. INSERT INTO transactions VALUES (5, '111222', 'X', 500, 'N');
  14. INSERT INTO transactions VALUES (6, '111222', 'P', 100000, 'N');
  15. INSERT INTO transactions VALUES (7, '111222', 'C', 200000, 'N');
  16.  
  17. CREATE TABLE accounts (
  18.   account_id        VARCHAR(6)  NOT NULL,
  19.   account_name      VARCHAR(20) NOT NULL,
  20.   credit_limit      NUMBER(6)   NOT NULL,
  21.   credit_used       NUMBER(6)   NOT NULL);
  22. INSERT INTO accounts VALUES ('111222', 'John Dough', 2000, 1000);
  23. INSERT INTO accounts VALUES ('222333', 'Johnny Cash', 3000, 1000);
  24.  
  25. CREATE TABLE errors (
  26.   transaction_number  NUMBER(8)    NOT NULL,
  27.   error_message       VARCHAR(60)  NOT NULL);
  28.